USE [BMIG_Mensual_POST_CADENA]
GO

 -- creating the store procedure
IF EXISTS (SELECT name FROM   sysobjects WHERE  name = N'[dbo].[WASP_M0014_CREATE_CALC_COMISION]'  AND type = 'P')
    DROP PROCEDURE [dbo].[WASP_M0014_CREATE_CALC_COMISION]
GO


CREATE PROCEDURE [dbo].[WASP_M0014_CREATE_CALC_COMISION]
AS

BEGIN
	if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[as_prim_comCesan]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
	drop table [dbo].[as_prim_comCesan]
END

BEGIN
	CREATE TABLE [dbo].[as_prim_comCesan] (
		[PLAZO_CUOTAS]		[varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
		[MONTO_PRIMA]		[numeric](38, 0) NULL ,
		[MONTO_COMISION]	[numeric](18, 0) NULL 
	) ON [PRIMARY]
END